﻿using Albatross.WPF.Common.ViewModels;
using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Albatross.SharePoint.Explorer.ViewModels {
	public class GroupViewModel : ClientObjectViewModel {
		public GroupViewModel(ClientContext context, string name, Group Group) : base(context, name, Group) { }

		Group Group { get { return (Group)ClientObject; } }
		public override string GetTreeItemTitle() {
			if (Name == string.Empty) {
				return Group.Title;
			} else {
				return string.Format("{0} ({1})", Name, Group.Title);
			}
		}

		public override string GetContentTitle() {
			if (Name == string.Empty) {
				return Group.Title;
			} else {
				return string.Format("{0} ({1})", Name, Group.Title);
			}
		}
	}
}
